home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Stretching the Mind / Lyric Writer < prev    next >
Lisp/Scheme  |  1997-06-06  |  906b  |  38 lines

  1. (defun make-sentence (length words)
  2.   (let (out)
  3.     (dotimes (i length)
  4.       (push (pick-random words) out))
  5.     out))
  6.  
  7. (defun make-sentences (n words)
  8.   (terpri)
  9.   (dotimes (i n) 
  10.     (print-list (make-sentence (pick-random '(3 4 5)) words))))
  11.  
  12. (defun print-list (l)
  13.   (mapcar #'(lambda (x) (princ x) (princ " ")) l)
  14.   (terpri))
  15.  
  16. (setq words '(
  17.  
  18. This module enables to input 3 dimensional data or 3 simulataneous
  19. parameters for auditioning in this example a 10 dimensional oscillating
  20. superstring-like object is auditioned by pushing 3 probes into it
  21. User control could cover rhythmics voicing initial tonality
  22.  
  23. ))
  24.  
  25. (make-sentences 10 words)
  26. -->
  27.  
  28. 3 it 3 
  29. control 3 initial or dimensional 
  30. into voicing superstring-like 
  31. initial to in into oscillating 
  32. dimensional this this cover 
  33. by object probes 
  34. 3 for simulataneous user auditioned 
  35. initial module 3 data 
  36. 3 initial input 
  37. for this a for parameters 
  38.